package edu.wright.ceg4980.year2013.keyboard;

import java.util.Collection;

public class KeyTimingDataSequence {
	private KeyData[] keyPresses;
	private KeyData[] keyReleases;
	
	public KeyTimingDataSequence(Collection<KeyData> keyPresses, Collection<KeyData> keyReleases) {
		if (keyPresses.size() != keyReleases.size()) {
			throw new IllegalArgumentException(String.format("Key Press and Key Release sequence size mismatch: %d != %d", keyPresses.size(), keyReleases.size()));
		}
		
		this.keyPresses = keyPresses.toArray(new KeyData[0]);
		this.keyReleases = keyReleases.toArray(new KeyData[0]);
	}
	
	public KeyData[] getKeyPresses() {
		return keyPresses;
	}
	
	public KeyData[] getKeyReleases() {
		return keyReleases;
	}
}
